#!/usr/bin/env ruby
#
# Test for util.rb
#

require 'test/unit'
require File.join(File.dirname(__FILE__),'../script/util')

include Util

class UtilStringFromArgTest < Test::Unit::TestCase 
  
  def setup

  end
  
  def teardown

  end

  def test_nil
    assert_equal nil,        Util::string_from_arg(nil)
  end

  def test_empty
    assert_equal '',        Util::string_from_arg('')
  end

  def test_string
    assert_equal 'asdf',        Util::string_from_arg('asdf')
  end

  def test_file
    f = File.join(File.dirname(__FILE__),'../script/util.rb')
    assert_not_equal f,        Util::string_from_arg(f)
  end

  def test_url
    f = 'http://jeffpalm.com'
    assert_not_equal f,        Util::string_from_arg(f)
  end


end
